package com.cmower.dzone.optional;

import java.util.List;

/**
 * @author 沉默王二，一枚有趣的程序员
 */
public class WithoutOptionalDemo {
    class Member {
        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public static void main(String[] args) {
        Member mem = getMemberByIdFromDB();
//        if (mem != null) {
            System.out.println(mem.getName());
//        }
    }

    public static Member getMemberByIdFromDB() {
        // 当前 ID 的会员不存在
        return null;
    }
}
